package homework;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class demoljk {
    @Test
    public void test02() throws IOException {
        ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");
        test test = (test) ac.getBean("test");
        System.out.println(test);
        ((ClassPathXmlApplicationContext) ac).close();
    }
}
